import type { WarnItemDetailType, WarnDataParamsType, WarnDataType } from "@/types/rodWarn";
import { myGet, myRequest } from "@/utils/reuqest";

// 获取告警列表
export const getWarnDataAPI = (params: WarnDataParamsType) => {
    return myGet<WarnDataType>('/pole/warning/list', params)
}

// 获取告警详情
export const getWarnDetailAPI = (id: number) => {
    return myGet<WarnItemDetailType>(`/pole/warning/${id}`)
}

// 删除告警
export const deleteWarnAPI = (id: number) => {
    return myRequest({
        url: `/pole/warning/${id}`,
        method: 'DELETE'
    })
}